// 工厂模式
class Hamburger {
    constructor() {
        this.price = 15
        this.time = "10min"
    }
}

class Coke {
    constructor() {
        this.price = 10
        this.time = "5min"
    }
}

class iceCream {
    constructor() {
        this.price = 5
        this.time = "1min"
    }
}

export default function (name) {
    switch (name) {
        case 'Hamburger':
            return new Hamburger()
        case 'Coke':
            return new Coke()
        case 'iceCream':
            return new iceCream()
    }
}